<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      lm-sensors-3-6-0
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;12.&nbsp;System Utilities
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="lsb-tools.html" title=
          "LSB-Tools-0.6">Prev</a>
          <p>
            LSB-Tools-0.6
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="logrotate.html" title=
          "Logrotate-3.15.1">Next</a>
          <p>
            Logrotate-3.15.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="lm_sensors" name="lm_sensors"></a>lm-sensors-3-6-0
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to lm_sensors
        </h2>
        <p>
          The <span class="application">lm_sensors</span> package provides
          user-space support for the hardware monitoring drivers in the Linux
          kernel. This is useful for monitoring the temperature of the CPU
          and adjusting the performance of some hardware (such as cooling
          fans).
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://github.com/lm-sensors/lm-sensors/archive/V3-6-0/lm-sensors-3-6-0.tar.gz">
                https://github.com/lm-sensors/lm-sensors/archive/V3-6-0/lm-sensors-3-6-0.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: f60e47b5eb50bbeed48a9f43bb08dd5e
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 268 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 2.6 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: less than 0.1 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          lm_sensors Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="which.html" title=
          "Which-2.21 and Alternatives">Which-2.21</a>
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="ulink" href="http://oss.oetiker.ch/rrdtool/">RRDtool</a>
          (required to build the <span class=
          "command"><strong>sensord</strong></span> program)
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/lm_sensors">http://wiki.linuxfromscratch.org/blfs/wiki/lm_sensors</a>
        </p>
      </div>
      <div class="kernel" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="lm_sensors-kernel" name="lm_sensors-kernel"></a>Kernel
          Configuration
        </h2>
        <p>
          Getting your kernel config right is an iterative process that may
          require that you recompile your kernel a couple of times. The
          simplest way to go about it is to start by enabling modules and
          then compile everything that may be needed by Lm Sensors as a
          module:
        </p>
        <pre class="screen">
<code class=
"literal">[*] Enable loadable module support  ---&gt;  [CONFIG_MODULES]

Bus options (PCI etc.)  ---&gt;
  [*] PCI support                         [CONFIG_PCI]

Device Drivers  ---&gt;
  I2C support ---&gt;
    &lt;*/M&gt; I2C device interface            [CONFIG_I2C_CHARDEV]
    I2C Hardware Bus support  ---&gt;
      &lt;M&gt; (configure all of them as modules)
  &lt;*/M&gt; Hardware Monitoring support  ---&gt; [CONFIG_HWMON]
    &lt;M&gt; (configure all of them as modules)</code>
</pre>
        <p>
          Recompile your kernel and reboot into the new kernel. Don't forget
          to <span class="command"><strong>make
          modules_install</strong></span> We will come back to the kernel in
          the Configuring section below.
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of lm_sensors
        </h2>
        <p>
          Install <span class="application">lm_sensors</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">make PREFIX=/usr        \
     BUILD_STATIC_LIB=0 \
     MANDIR=/usr/share/man</kbd>
</pre>
        <p>
          This package does not come with a test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make PREFIX=/usr        \
     BUILD_STATIC_LIB=0 \
     MANDIR=/usr/share/man install &amp;&amp;

install -v -m755 -d /usr/share/doc/lm_sensors-3-6-0 &amp;&amp;
cp -rv              README INSTALL doc/* \
                    /usr/share/doc/lm_sensors-3-6-0</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>BUILD_STATIC_LIB=0</code></em>: This
          parameter disables compiling and installing the static version of
          <code class="filename">libsensors</code>.
        </p>
        <p>
          <em class="parameter"><code>PROG_EXTRA=sensord</code></em>: This
          parameter enables compiling <span class=
          "command"><strong>sensord</strong></span>, a daemon that can
          monitor your system at regular intervals. Compiling <span class=
          "command"><strong>sensord</strong></span> requires <a class="ulink"
          href="http://oss.oetiker.ch/rrdtool/">RRDtool</a>. Compiling
          RRDtool 1.4.6 requires a sed: <span class="command"><strong>sed -i
          '/ sv_undef/d' bindings/perl-shared/RRDs.xs</strong></span>.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring Lm Sensors
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="lm_sensors-config" name="lm_sensors-config"></a>
          </h3>
          <h4 class="title">
            <a id="lm_sensors-config" name="lm_sensors-config"></a>Config
            File
          </h4>
          <p>
            <code class="filename">/etc/sensors3.conf</code>
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm45779270576880" name=
            "idm45779270576880"></a>Configuration Information
          </h4>
          <p>
            To find out what hardware sensors your system has, issue the
            following command as the <code class="systemitem">root</code>
            user:
          </p>
          <pre class="root">
<kbd class="command">sensors-detect</kbd>
</pre>
          <p>
            The appropriate modules should have been loaded and a summary is
            displayed at the end. Now you know what is needed and you can
            recompile your kernel to enable just the options you need (i.e.,
            don't enable the modules you cannot use).
          </p>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">fancontrol, isadump, isaset, pwmconfig,
              sensors, sensors-conf-convert, sensors-detect, and optionally,
              sensord</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">libsensors.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/etc/sensors.d, /usr/include/sensors and
              /usr/share/doc/lm_sensors-3-6-0</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="fancontrol" name="fancontrol"></a><span class=
                    "term"><span class=
                    "command"><strong>fancontrol</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a shell script for use with <span class=
                    "application">lm_sensors</span>. It reads its
                    configuration from a file, then calculates fan speeds
                    from temperatures and sets the corresponding PWM outputs
                    to the computed values.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="isadump" name="isadump"></a><span class=
                    "term"><span class=
                    "command"><strong>isadump</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a small helper program to examine registers visible
                    through the ISA bus. It is intended to probe any chip
                    that lives on the ISA bus working with an address
                    register and a data register (I2C-like access) or a flat
                    range (of up to 256 bytes).
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="isaset" name="isaset"></a><span class=
                    "term"><span class=
                    "command"><strong>isaset</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a small helper program to set registers visible
                    through the ISA bus.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pwmconfig" name="pwmconfig"></a><span class=
                    "term"><span class=
                    "command"><strong>pwmconfig</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    tests the pulse width modulation (PWM) outputs of sensors
                    and configures fancontrol.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sensors" name="sensors"></a><span class=
                    "term"><span class=
                    "command"><strong>sensors</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    prints the current readings of all sensor chips.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sensors-conf-convert" name=
                    "sensors-conf-convert"></a><span class=
                    "term"><span class="command"><strong>sensors-conf-convert</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a <span class="application">Perl</span> script to
                    convert <span class="application">lm-sensors</span>
                    version 2 configuration files to work with version 3.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sensors-detect" name=
                    "sensors-detect"></a><span class="term"><span class=
                    "command"><strong>sensors-detect</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a <span class="application">Perl</span> script that
                    will walk you through the process of scanning your system
                    for various hardware monitoring chips (sensors) supported
                    by <code class="filename">libsensors</code>, or more
                    generally by the <span class=
                    "application">lm_sensors</span> tool suite.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sensord" name="sensord"></a><span class=
                    "term"><span class=
                    "command"><strong>sensord</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    (optional) is a daemon that can be used to periodically
                    log sensor readings.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libsensors" name="libsensors"></a><span class=
                    "term"><code class="filename">libsensors.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the <span class="application">lm_sensors</span>
                    API functions.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-17 12:03:00 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="lsb-tools.html" title=
          "LSB-Tools-0.6">Prev</a>
          <p>
            LSB-Tools-0.6
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="logrotate.html" title=
          "Logrotate-3.15.1">Next</a>
          <p>
            Logrotate-3.15.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
